package coreentity

import (
	"core/class"
	"core/datetime"
	"core/selfreg"
	"reflect"
)

type HtUserDept struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	HtuserId int64              `json:"htuserId,string"                    gorm:"column:htuser_id;DEFAULT:0;not null;comment:用户编号;"`
	HtdeptId int64              `json:"htdeptId,string"                    gorm:"column:htdept_id;DEFAULT:0;not null;comment:机构编号;"`
	State    string             `json:"state"        validate:"max=10"   gorm:"column:state;size:10;DEFAULT:'';not null;comment:状态;memo:启用、停用;"`
	CrtDt    datetime.MyTime    `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	CrtUid   int64              `json:"crtUid,string"                    gorm:"column:crt_uid;DEFAULT:0;not null;comment:创建人编号;"`
	CrtDid   int64              `json:"crtDid,string"                    gorm:"column:crt_did;DEFAULT:0;not null;comment:机构编号;"`
	EdtDt    datetime.MyTime    `json:"edtDt"                            gorm:"column:edt_dt;not null;comment:修改日期;"`
	EdtUid   int64              `json:"edtUid,string"                    gorm:"column:edt_uid;DEFAULT:0;not null;comment:修改人编号;"`
	Gid      string             `json:"gid"                              gorm:"column:gid;DEFAULT:'';type:char(36);not null;comment:Gid;"`
	Deleted  datetime.DeletedAt `json:"deleted"                          gorm:"column:deleted;DEFAULT:0;type:tinyint(1);not null;comment:删除标志;"`
}

func (p *HtUserDept) TableName() string {
	return "HtUserDept"
}

func init() {

	var mcls = &HtUserDept{}
	var m = &class.MyClass{
		Name:     "用户机构表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  "",
		Type:     reflect.TypeOf(mcls),
	}
	selfreg.AddEntity(m)
}
